package ss.pku.meeting.controller;

import ss.pku.meeting.entities.Msg;
import ss.pku.meeting.service.RepairService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

@RestController
public class RepairController {

    @Autowired
    RepairService repairService;

    @PostMapping("/repair")
    public Msg repairApply(MultipartFile file, int equip, String msg, int id) throws IOException {
        return repairService.handleRepair(file, equip, msg, id);
    }
}
